package com.etc.dao;

import com.etc.entity.Detail;
import com.etc.entity.Drug;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DetailMapper {
    /**
     * 通过支付编号查询订单详情
     * @param payId
     * @return
     */
    List<Detail> findDetail(String payId);

    /**
     * 添加订单详情
     * @param detail
     * @return
     */
    int insertDetail(Detail detail);

    /**
     * 通过订单编号删除订单详情
     * @param detailId
     * @return
     */
    int deleteDetail(@Param("detailId") int detailId,@Param("payId") String payId);

    /**
     * 修改订单详情
     * @param detail
     * @return
     */
    int updateDetail(Detail detail);

    /**
     * 批量删除
     * @param detailIdList
     * @return
     */
    int deleteByPrimaryKeyBatch(List<String> detailIdList);

}
